﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleNetServer
{
	class PacketReader
	{
		private byte[] m_Buffer;
		private int m_Length;
		private int m_Position;

		public PacketReader(byte[] buffer, int length)
		{
			m_Buffer = buffer;
			m_Length = length;
			m_Position = 0;
		} //

		public string ReadString(int length)
		{
			var s = System.Text.Encoding.ASCII.GetString(m_Buffer, m_Position, length);
			m_Position += length;
			return s;
		} // 

	} // class
}
